const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}

const information = [
  {
    // 新郎
    "groom": "蓝井优太",
    "groom_phone": "13500000000",
    // 新浪
    "bride": "三上悠亚",
    "bride_phone": "13500000000",
    "time": '2022年10月02日',
    "hotel": "海港城海鲜大酒楼",
    "address": "广东省中山市东区街道东区街道中山五路65号",
    "latitude": 22.516561, "longitude": 113.417521
  }
]

module.exports = {
  formatTime: formatTime,
  info: information
}
